package com.longxin.demoapp.experiments.experiment1.controller;

import android.os.Bundle;
import android.view.View;

import com.longxin.demoapp.R;
import com.longxin.demoapp.base.controller.IBaseController;
import com.longxin.demoapp.experiments.experiment1.service.Experiment1Service;
import com.longxin.demoapp.experiments.experiment1.service.impl.Experiment1ServiceImpl;

/**
 * @author Long
 * @version 1.0
 * @description: 实验一：题中计算器
 * @remarks:
 * @title ExperimentActivity1
 * @date 2021/4/6 16:53
 */
public class Experiment1Controller extends IBaseController<Experiment1Service> {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.experiment_1_main);

        //服务层初始化
        service = new Experiment1ServiceImpl(this);

        /**
         * @description: 监听按钮
         * @author
         * @date
         */
        findViewById(R.id.experiment_1_main_btn_comput).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                service.comput(v);
            }
        });
    }
}
